package it.uni.bo.monitoring.sla.context;

public class AutomataTransition 
{ 
    /* A class to store a transition between states of an automaton */
    
    private AutomataState target;
    private String label;
    private int guard; 

    public AutomataTransition(AutomataState t) {
    	target = t;
    	label = "";
    	guard = -1;
    }
    
    public AutomataTransition(AutomataState t, String lab) {
    	target = t;
    	label = lab;
    	guard = -1;
    }
    
    public AutomataTransition(AutomataState t, int gu) {
    	target = t;
    	guard = gu;
    	label = "";
	}
    
	public AutomataTransition(AutomataState t, String lab, int gu) {
    	target = t;
    	label = lab;
    	guard = gu;
	}

	public void setTarget(AutomataState t) {
	target = t;
    }

    public void setGuard(int g) {
	guard = g;
    }

    public void setLabel(String lab) {
	label = lab;
    }
    public AutomataState getTarget() {
    	return target;
    }
   
    public String getLabel() {
    	return label;
    }
    public int getGuard() {
    	return guard;
    }
    
    public void printTransition() {
	System.out.println("Target: "+target.getName());
	System.out.println("Label: "+label);
	System.out.println("Guard: "+guard);
    }

}
